package com.crnn.smart.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.springframework.security.core.GrantedAuthority;

import java.io.Serializable;

@Data
@TableName("role")
public class Role implements GrantedAuthority, Serializable {

    @TableId(type = IdType.AUTO)
    private String id;
    private String name;

    @Override
    public String getAuthority() {
        return this.name;
    }
}
